﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true"
    CodeFile="KhachHang.aspx.cs" Inherits="KhachHang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>
            <div class="panel panel-success margin">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Quản lý khách hàng</h3>
                </div>
                <div class="panel-body">
                    <table width="100%">
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Loại khách hàng</span><br />
                                <asp:DropDownList Width="98%" ID="drloaikh" DataTextField="TenLoaiKH" DataValueField="ids"
                                    runat="server" CssClass="form-control withall" 
                                    onselectedindexchanged="drloaikh_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ValidationGroup="Them" ID="RequiredFieldValidator1" runat="server"
                                    ControlToValidate="drloaikh" ErrorMessage="Chọn loại khách hàng" Display="None"
                                    Text="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Tên khách hàng</span><br />
                                <asp:TextBox ID="txttenkh" Width="98%" runat="server" CssClass="form-control withall">
                                </asp:TextBox>
                                <asp:RequiredFieldValidator ValidationGroup="Them" ID="RequiredFieldValidator2" runat="server"
                                    ControlToValidate="txttenkh" ErrorMessage="Nhập tên khách hàng" Display="None"
                                    Text="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Số điện thoại</span><br />
                                <asp:TextBox ID="txtsodienthoai" Width="98%" runat="server" CssClass="form-control withall">
                                </asp:TextBox>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Người đại diện</span><br />
                                <asp:TextBox ID="txtnguoidaidien" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Công trình</span><br />
                                <asp:TextBox ID="txtcongtrinh" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                                <asp:RequiredFieldValidator ValidationGroup="Them" ID="RequiredFieldValidator3" runat="server"
                                    ControlToValidate="txtcongtrinh" ErrorMessage="Nhập công trình" Display="None"
                                    Text="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Hạng mục</span><br />
                                <asp:TextBox ID="txthangmuc" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Nhân viên minh doanh</span><br />
                                <asp:DropDownList ID="drnhanvienkinhdoanh" DataTextField="hoten" DataValueField="ids"
                                    Width="98%" runat="server" CssClass="form-control withall">
                                </asp:DropDownList>
                               
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Ngày ký hợp đồng</span><br />
                                <asp:TextBox ID="txtngaykyhd" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                               
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender1" runat="server"
                                    TargetControlID="txtngaykyhd" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtngaykyhd" ValidChars="/-" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Km vận chuyển</span><br />
                                <asp:TextBox ID="txtkmvanchuyen" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtkmvanchuyen" ValidChars=",." />
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Từ ngày</span><br />
                                <asp:TextBox ID="txttungay" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender2" runat="server"
                                    TargetControlID="txttungay" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txttungay" ValidChars="/-" />
                                
                            </td>
                            <td>
                                Đến ngày<br />
                                <asp:TextBox ID="txtdenngay" Width="98%" runat="server" CssClass="form-control withall"></asp:TextBox>
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender3" runat="server"
                                    TargetControlID="txtdenngay" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtdenngay" ValidChars="/-" />
                               
                            </td>
                           <td>
                                Loại công trình<br />
                                <asp:RadioButton ID="RadioButton1" GroupName="xe2" Checked="true" runat="server" Text="Của công ty" />&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioButton2" GroupName="xe2" runat="server" Text="Tư mang về" />&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioButton3" runat="server" GroupName="xe2" Text="Đi ký HĐ" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="btnSave" ValidationGroup="Them" runat="server" Style="margin-left: 5px;"
                                    Text="Lưu lại" CssClass="btn btn-primary" OnClick="btnAdd_Click" />
                                <asp:Button ID="btncapnhatcongtrinh" runat="server"  Style="margin-left: 5px;" Text="Cập nhật công trình"
                                    CssClass="btn btn-primary"  
                                    onclick="btncapnhatcongtrinh_Click"  />
                                <asp:Button ID="btncapnhat" runat="server" Text="Cập nhật khách hàng" CssClass="btn btn-info"
                                    OnClick="btnUpdate_Click" Visible="false" />
                                <asp:Button ID="btnXoacongTrinh" runat="server" Text="Xóa công trình" CssClass="btn btn-info"
                                    Visible="false" OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')" OnClick="btnXoacongTrinh_Click" />
                                <asp:Button ID="btncapnhahangmuc" runat="server" Text="Cập nhật hạng mục" CssClass="btn btn-info"
                                    Visible="false" OnClick="btncapnhahangmuc_Click" />
                                <asp:Button ID="btnxoahangmuc" runat="server" Text="Xóa hạng mục" CssClass="btn btn-info"
                                    Visible="false" OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')" OnClick="btnxoahangmuc_Click" />
                                <asp:Button ID="btnCancel" runat="server" Text="Nhập mới" CssClass="btn btn-warning"
                                    OnClick="btnCancel_Click" />
                                <asp:Button ID="btnAddCongTrinh" runat="server" Text="Thêm công trình" CssClass="btn btn-warning"
                                    Visible="false" />
                                <asp:Button ID="btnAddHangMuc" runat="server" Text="Thêm hạng mục" CssClass="btn btn-info"
                                    Visible="false" />
                                    <asp:Button ID="btnThayDoiNVKD" Visible="false"  runat="server" Style="margin-left: 5px;"
                                    Text="Thay đổi NVKD" CssClass="btn btn-primary" 
                                     />
                                <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="Image1"
                                    Drag="True" BackgroundCssClass="modalBackground" PopupControlID="Panel1" TargetControlID="btnAddHangMuc"
                                    RepositionMode="RepositionOnWindowResize">
                                </cc1:ModalPopupExtender>
                            </td>
                        </tr>
                    </table>
                    <asp:ValidationSummary ID="ValidationSummary1" HeaderText="Bạn phải nhập các trường sau:"
                        ShowMessageBox="true" ValidationGroup="Them" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
                    <asp:ValidationSummary ID="ValidationSummary2" HeaderText="Bạn phải nhập các trường sau:"
                        ShowMessageBox="true" ValidationGroup="ThemCT" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
                    <asp:ValidationSummary ID="ValidationSummary3" HeaderText="Bạn phải nhập các trường sau:"
                        ShowMessageBox="true" ValidationGroup="ThemCT1" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
                        <asp:ValidationSummary ID="ValidationSummary4" HeaderText="Bạn phải nhập các trường sau:"
                        ShowMessageBox="true" ValidationGroup="ThedoinhanvienkdmCT" ShowSummary="false" EnableClientScript="true"
                        runat="server" />
                </div>
            </div>
            <div style="margin: 5px;">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <b>Danh sách khách hàng</b>
                    </div>
                    <asp:DropDownList  Width="300px" ID="dlloaikh" DataTextField="TenLoaiKH" DataValueField="ids"
                        runat="server" CssClass="form-control withall" AutoPostBack="true"
                        onselectedindexchanged="dlloaikh_SelectedIndexChanged">
                    </asp:DropDownList>
                     <asp:DropDownList  Width="300px"   ID="dlkh" DataTextField="Tenkhachhang" DataValueField="ids"
                        runat="server" CssClass="form-control withall">
                    </asp:DropDownList>
                    <asp:Button ID="btnTK" runat="server" Style="margin-left: 5px;" Text="Tìm kiếm" 
                        CssClass="btn btn-primary" onclick="btnTK_Click"
                             />
                    <div style="width: 100%; margin-top: 0px;" class="wrapper">
                        <asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" BackColor="White"
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="1" EmptyDataText="Không có dữ liệu nào"
                            EnableModelValidation="True" ShowFooter="false" CssClass="form-control withall"
                            Width="99%" OnRowCommand="GV_RowCommand">
                            <Columns>
                                <asp:TemplateField HeaderText="Xóa" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                    ItemStyle-Width="50px">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="lbXoa" runat="server" Width="20px" Height="20px" ImageUrl="~/img/delete-24.png"
                                            OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')" CommandArgument='<%#Eval("IDs")%>'
                                            Text="Xóa" CommandName="Del" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Khách hàng" ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="padding">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbSua1" Style="color: #000066;" runat="server" Text='<%#Eval("TenKhachHang") %>'
                                            CommandArgument='<%#Eval("IDs")%>' CommandName="Themcongtrinh" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Công trình" ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="padding">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbSua12" Style="color: #000066;" runat="server" Text='<%#Eval("congtrinh") %>'
                                            CommandArgument='<%#Eval("macongtrinh")%>' CommandName="suacongtrinh" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Hạng mục" ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="padding">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbSua11" Style="color: #000066;" runat="server" Text='<%#Eval("hangmuc") %>'
                                            CommandArgument='<%#Eval("mahangmuc")%>' CommandName="suahangmuc" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="tenloaikh" ItemStyle-CssClass="padding" HeaderText="Loại khách hàng" />
                                <asp:BoundField DataField="ngayky" ItemStyle-CssClass="padding" HeaderText="Ngày ký hợp đồng" />
                                <asp:BoundField DataField="nguoidaidien" ItemStyle-CssClass="padding" HeaderText="Người đại diện" />
                                <asp:BoundField DataField="hoten" ItemStyle-CssClass="padding" HeaderText="Nhân viên kinh doanh" />
                                <asp:BoundField DataField="trangthai" ItemStyle-CssClass="padding" HeaderText="Hình thức" />
                                <asp:BoundField DataField="tungay" ItemStyle-CssClass="padding" HeaderText="Từ ngày" />
                                <asp:BoundField DataField="denngay" ItemStyle-CssClass="padding" HeaderText="Đến ngày" />
                                <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="padding">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbkhoatk" Style="color: red;" runat="server" Text='<%#Eval("khoatk") %>'
                                            CommandArgument='<%#Eval("IDs")%>' CommandName="khoataikhoan" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" Font-Bold="True" HorizontalAlign="Left" />
                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" Height="30px" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle BackColor="White" ForeColor="#000066" Height="30px" />
                            <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
                        </asp:GridView>
                    </div>
                    <div style="margin: 5px;">
                        <asp:Button ID="btnFirst" runat="server" Text="Đầu" CssClass="btn btn-primary" OnClick="btnFirst_Click" />
                        <asp:Button ID="btnPre" runat="server" Style="margin-left: 5px;" Text="Trước" CssClass="btn btn-primary"
                            OnClick="btnPre_Click" />
                        <asp:Button ID="btnNext" runat="server" Style="margin-left: 5px;" Text="Sau" CssClass="btn btn-warning"
                            OnClick="btnNext_Click" />
                    </div>
                </div>
                <asp:HiddenField ID="hdID" runat="server" />
                <asp:HiddenField ID="hdID1" runat="server" />
                <asp:HiddenField ID="hdID2" runat="server" />
            </div>
            <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" CancelControlID="ImgClose"
                Drag="True" BackgroundCssClass="modalBackground" PopupControlID="addcongtrinh"
                TargetControlID="btnAddCongTrinh" RepositionMode="RepositionOnWindowResize">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="addcongtrinh" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <asp:Image ID="ImgClose" Width="30px" Height="25px" Style="cursor: pointer;" runat="server"
                                ImageUrl="img/close.ico" ToolTip="Đóng" />
                        </td>
                    </tr>
                </table>
                <div style="background-image: url('img/content.png'); background-repeat: repeat;
                    box-shadow: 5px 5px 5px #888; border-radius: 10px; border: 1px solid #6EA1C0;
                    margin-top: -10px;">
                    <div style="background-color: #5B5B5B; color: White; font-weight: bold; border-radius: 5px 5px 0px 0px;
                        width: 800px; text-align: center; line-height: 26px; overflow: hidden;">
                        THÊM CÔNG TRÌNH
                    </div>
                    <table width="800px" style="margin-top: 15px; padding: 5px;">
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Công trình</span><br />
                                <asp:TextBox ID="txtaddcongtrinh" runat="server" CssClass="form-control with98"></asp:TextBox>
                                <asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator10"
                                    runat="server" ControlToValidate="txtaddcongtrinh" ErrorMessage="Nhập tên công trình"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Nhân viên minh doanh</span><br />
                                <asp:DropDownList ID="draddnhanvienkinhdoanh" DataTextField="hoten" DataValueField="ids"
                                    runat="server" CssClass="form-control with98">
                                </asp:DropDownList>
                                <%--<asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator12"
                                    runat="server" ControlToValidate="draddnhanvienkinhdoanh" ErrorMessage="Nhập nhân viên kinh doanh"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>--%>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Ngày ký hợp đồng</span><br />
                                <asp:TextBox ID="txtaddngaykyhd" runat="server" CssClass="form-control with98"></asp:TextBox>
                                <asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator13"
                                    runat="server" ControlToValidate="txtaddngaykyhd" ErrorMessage="Nhập ngày ký hợp đồng"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender4" runat="server"
                                    TargetControlID="txtaddngaykyhd" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtaddngaykyhd" ValidChars="/-" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Km vận chuyển</span><br />
                                <asp:TextBox ID="txtaddkmvanchuyen" runat="server" CssClass="form-control with98"></asp:TextBox>
                                <asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator14"
                                    runat="server" ControlToValidate="txtaddkmvanchuyen" ErrorMessage="Nhập km vận chuyển"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Từ ngày</span><br />
                                <asp:TextBox ID="txtaddtungay" runat="server" CssClass="form-control with98"></asp:TextBox>
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender5" runat="server"
                                    TargetControlID="txtaddtungay" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtaddtungay" ValidChars="/-" />
                                <%--<asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator15"
                                    runat="server" ControlToValidate="txtaddtungay" ErrorMessage="Nhập từ ngày" Display="None"
                                    Text="*"></asp:RequiredFieldValidator>--%>
                            </td>
                            <td>
                                Đến ngày<br />
                                <asp:TextBox ID="txtaddenngay" runat="server" CssClass="form-control with98"></asp:TextBox>
                                <cc1:CalendarExtender PopupPosition="BottomRight" ID="CalendarExtender6" runat="server"
                                    TargetControlID="txtaddenngay" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" FilterType="Custom,Numbers"
                                    TargetControlID="txtaddenngay" ValidChars="/-" />
                                <%--<asp:RequiredFieldValidator ValidationGroup="ThemCT" ID="RequiredFieldValidator16"
                                    runat="server" ControlToValidate="txtaddenngay" ErrorMessage="Nhập ngày kết thúc"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>--%>
                            </td>
                             <td>
                                Loại công trình<br />
                                <asp:RadioButton ID="rdCuaCongTY" GroupName="xe1" Checked="true" runat="server" Text="Của công ty" />&nbsp;&nbsp;
                                <asp:RadioButton ID="rdTuMangVe" GroupName="xe1" runat="server" Text="Tư mang về" />&nbsp;&nbsp;
                                <asp:RadioButton ID="rdiKY" runat="server" GroupName="xe1" Text="Đi ký HĐ" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                &nbsp;<asp:Button ID="btnAddSP" ValidationGroup="ThemCT" CssClass="btn btn-warning"
                                    runat="server" Text="Lưu lại" OnClick="btnAddSP_Click" />
                                
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="ModalPopupExtender11" runat="server" CancelControlID="Image1"
                Drag="True" BackgroundCssClass="modalBackground" PopupControlID="Panel1" TargetControlID="btnAddHangMuc"
                RepositionMode="RepositionOnWindowResize">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="Panel1" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <asp:Image ID="Image1" Width="30px" Height="25px" Style="cursor: pointer;" runat="server"
                                ImageUrl="img/close.ico" ToolTip="Đóng" />
                        </td>
                    </tr>
                </table>
                <div style="background-image: url('img/content.png'); background-repeat: repeat;
                    box-shadow: 5px 5px 5px #888; border-radius: 10px; border: 1px solid #6EA1C0;
                    margin-top: -10px;">
                    <div style="background-color: #5B5B5B; color: White; font-weight: bold; border-radius: 5px 5px 0px 0px;
                        width: 800px; text-align: center; line-height: 26px; overflow: hidden;">
                        THÊM HẠNG MỤC
                    </div>
                    <table width="800px" style="margin-top: 15px; padding: 5px;">
                        <tr>
                            <td>
                                <span style="margin-left: 5px;">Công trình</span><br />
                                <asp:DropDownList ID="draddcongtrinh" runat="server" DataTextField="TenCongTrinh"
                                    DataValueField="IDs" CssClass="form-control withall" Width="98%">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ControlToValidate="draddcongtrinh"
                                    Display="None" ErrorMessage="Chọn công trình" Text="*" ValidationGroup="ThemCT1"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                <span style="margin-left: 5px;">Hạng mục</span><br />
                                <asp:TextBox ID="txtaddhangmuc" runat="server" CssClass="form-control withall" Width="98%"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ControlToValidate="txtaddhangmuc"
                                    Display="None" ErrorMessage="Nhập tên hạng mục" Text="*" ValidationGroup="ThemCT1"></asp:RequiredFieldValidator>
                            </td>
                            <tr>
                                <td colspan="2">
                                    &nbsp;<asp:Button ID="btnHangMuc" ValidationGroup="ThemCT1" CssClass="btn btn-warning"
                                        runat="server" Text="Lưu lại" OnClick="btnHangMuc_Click" />
                                </td>
                            </tr>
                    </table>
                </div>

               
            </asp:Panel>
               <cc1:ModalPopupExtender ID="md" runat="server" CancelControlID="Image2"
                Drag="True" BackgroundCssClass="modalBackground" PopupControlID="doinvkd"
                TargetControlID="btnThayDoiNVKD" RepositionMode="RepositionOnWindowResize">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="doinvkd" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <asp:Image ID="Image2" Width="30px" Height="25px" Style="cursor: pointer;" runat="server"
                                ImageUrl="img/close.ico" ToolTip="Đóng" />
                        </td>
                    </tr>
                </table>
                <div style="background-image: url('img/content.png'); background-repeat: repeat;
                    box-shadow: 5px 5px 5px #888; border-radius: 10px; border: 1px solid #6EA1C0;
                    margin-top: -10px;">
                    <div style="background-color: #5B5B5B; color: White; font-weight: bold; border-radius: 5px 5px 0px 0px;
                        width: 800px; text-align: center; line-height: 26px; overflow: hidden;">
                        Thay đổi nhân viên kinh doanh
                    </div>
                    <table width="800px" style="margin-top: 15px; padding: 5px;">
                        <tr>
                            
                            <td>
                                <span style="margin-left: 5px;">Nhân viên minh doanh</span><br />
                                <asp:DropDownList ID="drnvkd" DataTextField="hoten" DataValueField="ids"
                                    runat="server" CssClass="form-control with98">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ValidationGroup="doinhanvienkd" ID="RequiredFieldValidator5"
                                    runat="server" ControlToValidate="drnvkd" ErrorMessage="Nhập nhân viên kinh doanh"
                                    Display="None" Text="*"></asp:RequiredFieldValidator>
                            </td>
                            
                                <td>
                                    <span style="margin-left: 5px;">Từ ngày</span><br />
                                    <asp:TextBox ID="txtdoinvkdkhtungay" runat="server" CssClass="form-control with98"></asp:TextBox>
                                    <cc1:CalendarExtender ID="CalendarExtender8" runat="server" Format="dd/MM/yyyy" 
                                        PopupPosition="BottomRight" TargetControlID="txtdoinvkdkhtungay">
                                    </cc1:CalendarExtender>
                                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" 
                                        FilterType="Custom,Numbers" TargetControlID="txtdoinvkdkhtungay" ValidChars="/-" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                                        ControlToValidate="txtdoinvkdkhtungay" Display="None" ErrorMessage="Nhập từ ngày" 
                                        Text="*" ValidationGroup="ThedoinhanvienkdmCT"></asp:RequiredFieldValidator>
                                    </td>
                                    
                                        <td>
                                            Đến ngày<br />
                                            <asp:TextBox ID="txtdoinvkddengay" runat="server" CssClass="form-control with98"></asp:TextBox>
                                            <cc1:CalendarExtender ID="CalendarExtender9" runat="server" Format="dd/MM/yyyy" 
                                                PopupPosition="BottomRight" TargetControlID="txtdoinvkddengay">
                                            </cc1:CalendarExtender>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" 
                                                FilterType="Custom,Numbers" TargetControlID="txtdoinvkddengay" ValidChars="/-" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                                                ControlToValidate="txtdoinvkddengay" Display="None" 
                                                ErrorMessage="Nhập ngày kết thúc" Text="*" ValidationGroup="ThedoinhanvienkdmCT"></asp:RequiredFieldValidator>
                                        </td>
                                    <td>
                                Loại công trình<br />
                                <asp:RadioButton ID="RadioButton4" GroupName="xe" Checked="true" runat="server" Text="Của công ty" />&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioButton5" GroupName="xe" runat="server" Text="Tư mang về" />&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioButton6" runat="server" GroupName="xe" Text="Đi ký HĐ" />
                            </td>
                          
                        </tr>
                        <tr>
                            <td colspan="3">
                                &nbsp;<asp:Button ID="Button1" ValidationGroup="ThedoinhanvienkdmCT" CssClass="btn btn-warning" 
                                    runat="server" Text="Lưu lại" onclick="Button1_Click"  />
                                
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
